package Blog.Managerv5_2;

import java.awt.event.ActionEvent;

public class LoginListener implements java.awt.event.ActionListener{
	
	private javax.swing.JTextField jt;
	private javax.swing.JFrame jf;
	public LoginListener(javax.swing.JTextField jt,javax.swing.JFrame jf){
		this.jt=jt;
		this.jf=jf;
	}
	public void actionPerformed(ActionEvent e) {
		if(jt.getText().equalsIgnoreCase("Administrator")){
			Manager m=new Manager();
			m.showUI();
			jf.dispose();
		}else jt.setText("Invalid Account");
	}
	
}
